package org.example.lotterysystem.common.utils;

import org.springframework.stereotype.Component;

import java.util.Random;
@Component
public class CreateCodeUtil {


    public static String createCode(){
        StringBuilder stringBuilder=new StringBuilder();
        Random random=new Random();
        int n=0;
        while(n<6){
            stringBuilder.append(random.nextInt(0,10));
            n++;
        }
        return stringBuilder.toString();
    }
}
